Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default debug behaviour #976

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Conversation

thomasp85
Copy link
Collaborator

Fix #962

As discussed in the issue, this PR changes the default behaviour of debugging to no longer be contingent on whether plumber is running interactively or not. It will now always be false if not set (either in $run() or with pr_set_debug()), but will give a message (once per session) if using the default (FALSE) and running interactively()

@@ -267,6 +266,14 @@ Plumber <- R6Class(
on.exit(unmount_docs(self, docs_info), add = TRUE)
}

if (!isTRUE(quiet) && inform_debug && rlang::is_interactive()) {
rlang::inform(
"Error reporting has been turned off by default. See `pr_set_debug()` for more details.\nTo disable this message, set a debug value.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@schloerke schloerke merged commit 2ed0ee5 into main Jan 27, 2025
12 checks passed
@schloerke schloerke deleted the issue962-falsy-debug-default branch January 27, 2025 20:39
schloerke added a commit that referenced this pull request Feb 5, 2025
* main: (28 commits)
  feat: add `excel` serializer/parser (#975)
  ci: Error on spelling (#981)
  docs: Improve forward docs a bit (#978)
  Fix file path tests on windows (#979)
  bug: Update default debug behaviour to `FALSE` (#976)
  perf: Avoid disk I/O during parsing (#972)
  docs: Add note on annotating required parameters (#971)
  Allows port to be specified as an environment variable (#963)
  tests: Replace `with_mock()` with `with_mocked_bindings()` (#970)
  feat(serializer): Add support for ragg and svglite (#964)
  chore: Fix pkgdown warnings. Use lifecycle inline R badges (#965)
  v1.2.2 release candidate (#948)
  bug: Use `{rlang}` instead of `{ellipsis}` (#958)
  docs: Update URLs (#954)
  docs: fix table spacing (#951)
  docs: change link to httr2 in routing and input vignette (#944)
  Specify interactive mode in doc (#932)
  Fall back to sys env var if R option doesn't exist (#934)
  Add support for quoted boundary for multipart request parsing. (#924)
  chore: Remove parse comment to match implementation (#931)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enh: Change the default value of debug to a FALSE-like sentinel value
2 participants